package org.example.T;

import org.springframework.stereotype.Repository;
//注解这个类是接受ioc容器管理的bean
@Repository
public class Child extends Person {
    public Child(){
        System.out.println("调用构造函数");
    }
    //儿子去买酱油
    public void bySalt(){
        System.out.println(this.getName()+"家里最小的，只能去买酱油");
        System.out.println(this.getName()+"成功买回酱油回来");
    }
}